package adv4;

import java.util.*;

import adv2.Book;

public class CollectionsTest {

	public static void main(String[] args) {
		List list = Arrays.asList(103, 4004, 43034, 45, 459043, 1045);
		Object max = Collections.max(list);
		System.out.println(max);

		List l2 = new ArrayList();
		l2.add(new Book("9天学会java", "IT", 3100));
		l2.add(new Book("21天学会python", "IT", 400));
		l2.add(new Book("十四天学会javascript", "IT", 500));
		l2.add(new Book("30天精通C语言", "IT", 600));
		// l2.add("黄正正家里有好大的产业等着继承！");
		System.out.println(l2);
		System.out.println(Collections.max(l2));
		Object o = Collections.min(l2);
		System.out.println("最小的是" + o);
		Collections.sort(l2);
		for (Object b : l2) {
			System.out.println(b);
		}
	}

}
